﻿module Sustainalytics.Common {

    export interface ILogFactory {
        log: (loggerObj: ILoggerDto) => any;
    }

    angular.module('shell').factory('logFactory', ['$http', 'staticObjects', ($http, staticObjects: IStaticObjects) => {
        var urlBase = staticObjects.apiBaseUrl + 'logging/';
        var logFactory: ILogFactory = {
            log: (loggerObj: ILoggerDto) => $http.post(urlBase + "log", loggerObj)
        };
        return logFactory;
    }]);
}